% \iffalse meta-comment
%!TEX program = xelatex
%!TEX builder = latexmk
% \fi
%\ProvidesFile{natbib}
% [2010/09/13 8.31b (PWD, AO)]
% \changes{4.0}{1993 Aug 19}{First documented release}
% \changes{4.1}{1993 Oct 4}{Simplification of \cs{@citeapalk}}
% \changes{4.1a}{1993 Oct 14}{Add \texttt{rev} option for reversed comments
%                             in \cs{cite}}
% \changes{4.1b}{1993 Oct 18}{Add \cs{bibfont} to list definition =\cs{relax}}
% \changes{4.2}{1993 Oct 22}{Add coding for AGU, NLINPROC}
% \changes{4.2}{1993 Nov 20}{Add more coding for AGU}
% \changes{4.3a}{1994 Feb 24}{First additions for \LaTeXe}
% \changes{5.0}{1994 May 18}{Revised for \LaTeXe{} and 2.09}
% \changes{5.0}{1994 May 18}{Remove obsolete JGR, GRL coding}
% \changes{5.0}{1994 May 18}{Add \cs{citeauthor}, \cs{citeyear}}
% \changes{5.0}{1994 May 18}{Two optional texts for \cs{cite} so \texttt{rev}
%                            option obsolete}
% \changes{5.0}{1994 May 18}{\LaTeXe\ options to select punctuation}
% \changes{5.1}{1994 Jun 22}{Conform to first official release of \LaTeXe}
% \changes{5.1}{1994 Jun 22}{Separate \LaTeX\ and 2.09 files}
% \changes{5.1}{1994 Jun 22}{Put doc driver first}
% \changes{5.2}{1994 Aug 25}{Fix up 2.09 style to run in compatibility mode}
% \changes{5.2}{1994 Aug 25}{\cs{citeauthor}, \cs{citeyear} make BibTeX
%                             entry in aux file}
% \changes{5.2}{1994 Aug 25}{\cs{@citex} defined as in \LaTeXe}
% \changes{5.2}{1994 Aug 25}{Local config file \texttt{natbib.cfg} read in}
% \changes{5.3}{1994 Sep 13}{Add \cs{citefullauthor}, options \texttt{angle},
%                             \texttt{curly}}
% \changes{5.3}{1994 Sep 19}{Add star version of \cs{cite} for full authors}
% \changes{5.3}{1994 Sep 26}{Fix accents in citations with proper definition
%                             of \cs{protect}}
% \changes{5.4}{1994 Nov 24}{Add space in \cs{@citex} for text cites}
% \changes{5.4}{1994 Nov 24}{Replace \cs{if@tempswa} by \cs{ifNAT@swa}}
% \changes{5.4}{1994 Nov 24}{Add superscript citation type to \cs{bibpunct}}
% \changes{5.4}{1994 Nov 24}{Add \cs{@citesuper}, fix up bugs in superscripts}
% \changes{5.4}{1994 Nov 24}{Define \cs{@citexnum} as in \LaTeXe}
% \changes{5.4}{1995 Feb 03}{Add \cs{citestyle} same as \cs{bibstyle}}
% \changes{5.4}{1995 Feb 08}{For repeated years and authors, print just letter}
% \changes{5.5}{1995 Mar 13}{Add \cs{bibhang} and command space in
%      \cs{@cite}}
% \changes{5.5}{1995 Mar 16}{Add \cs{citealt} for citation with no
%      parentheses}
% \changes{5.5}{1995 Mar 24}{Reorganize internal commands, using \cs{NAT@}
%     prefixes}
% \changes{5.5}{1995 Mar 24}{Punctuation selection commands \cs{bibpunct},
%     \cs{citestyle} are now preamble only, whereas previously they had to
%     come after the preamble}
% \changes{5.5}{1995 May 14}{Change names of punctuation commands to
%     \cs{NAT@...}}
% \changes{6.0}{1995 Sep 4}{Allow numerical styles with author-year
%     \texttt{bst} files}
% \changes{6.0}{1995 Sep 21}{Add automatic indexing of citations}
% \changes{6.0}{1995 Sep 29}{Accommodate \texttt{index} package}
% \changes{6.1}{1995 Nov 22}{Fixed for \LaTeXe\ \texttt{1995/12/01}}
% \changes{6.1}{1995 Dec 4}{Make more robust against changes to internals}
% \changes{6.1a}{1995 Dec 19}{Fix test for changed citations}
% \changes{6.2}{1996 Jan 10}{Replace all \cs{uppercase}}
% \changes{6.2}{1996 Jan 11}{Add \cs{citet}}
% \changes{6.2}{1996 Feb 2}{Fix superscript size}
% \changes{6.2}{1996 Mar 05}{Add length \cs{bibsep} for linespacing between
%               references}
% \changes{6.2}{1996 Apr 15}{Fix clash with \texttt{amsart} and
%              \texttt{amsbook}}
% \changes{6.3}{1996 Jun 10}{Allow \texttt{showkeys} to be loaded first}
% \changes{6.3}{1996 Jun 17}{Fix punctuation for \texttt{plainnat}}
% \changes{6.3}{1996 Jun 17}{Suppress extra labels with numericals}
% \changes{6.4}{1996 Jun 18}{Provide \cs{bibname} and \cs{refname}}
% \changes{6.4}{1996 Jun 27}{Change \texttt{nlinproc} option to \texttt{egs}}
% \changes{6.4}{1996 Sep 1}{Make compatible with \texttt{chapterbib.sty}}
% \changes{6.4}{1996 Sep 12}{Fix spacing for superscripts}
% \changes{6.4}{1996 Sep 12}{Extra letter printed with \cs{citeyear}}
% \changes{6.4}{1996 Sep 13}{Add compression and sorting of numerical citations}
% \changes{6.4}{1996 Oct 2}{Make compatible with \texttt{hyperref.sty}}
% \changes{6.5}{1996 Dec 11}{KOMA script compatibility}
% \changes{6.5}{1997 Jan 10}{For EGS, no blank line between references}
% \changes{6.5}{1997 Jan 30}{Recode notes so they work with \cs{citet} and
%     \cs{citep}; change documentation to stress these commands over \cs{cite}}
% \changes{6.5}{1997 Feb 5}{Fix KOMA script properly}
% \changes{6.6}{1997 Apr 6}{Fix \cs{nocite} to work with \texttt{chapterbib}}
% \changes{6.6}{1997 May 26}{Let \cs{citealt} have full \cs{cite} syntax}
% \changes{6.6}{1997 Jun 4}{Add \cs{citeyearpar}}
% \changes{6.6}{1997 Jun 4}{Add sorting of author--year citations}
% \changes{6.6}{1997 Jun 12}{Add \cs{citealp} like \cs{citep} without parentheses}
% \changes{6.6}{1997 Jun 24}{Fix \texttt{showkeys} functionality}
% \changes{6.6}{1997 Jun 25}{Improve \texttt{hyperref} functionality}
% \changes{6.6}{1997 Jun 30}{Fix bug in \cs{NAT@citex}}
% \changes{6.7}{1997 Jul 14}{Add \texttt{longnamesfirst} option}
% \changes{6.7}{1997 Sep 12}{Fix interface with \texttt{showkeys}}
% \changes{6.7}{1997 Nov 10}{Fix interface with \texttt{babel}}
% \changes{6.7}{1997 Nov 11}{Add reference sheet extraction}
% \changes{6.8}{1997 Dec 1}{Permit \cs{@biblabel} to be user modified}
% \changes{6.8}{1998 Feb 19}{Fix hyperref bug in \cs{citep}}
% \changes{6.8a}{1998 Mar 6}{Correct wrong name for \texttt{longnamesfirst}
%    in the documentation}
% \changes{6.8a}{1998 May 14}{\cs{@biblabel} only redefinable for numerical
%    mode}
% \changes{6.8b}{1998 July 6}{Hyperref: to work with \texttt{chapterbib} and
%     breaks links in textual citations}
% \changes{6.8c}{1998 July 14}{Hyperref: remove opening brace and notes from
%     link}
% \changes{6.8d}{1998 Nov 23}{Fix bug in \texttt{super} option; suppress brackets}
% \changes{6.9}{1999 Jan 22}{Fix bug with \cs{makeindex}}
% \changes{6.9}{1999 Feb 23}{Update copyright notice}
% \changes{6.9}{1999 Mar 26}{Babel test made more general}
% \changes{7.0}{1999 May 7}{With empty year, act like \cs{citeauthor}}
% \changes{7.0}{1999 May 21}{Correct \cs{bibsection} for \texttt{amsbook}}
% \changes{7.0a}{2000 Jul 24}{Argument of \cs{citenumfont} always in braces}
% \changes{7.0b}{2002 Feb 27}{Fix bug with superscripts}
% \changes{7.1}{2003 June 6}{Add test for missing extra letter in multi-cites}
% \changes{7.2}{2006 Jan 12}{Allow \texttt{hyperref} with compression}
% \changes{7.2}{2006 Jan 12}{Add compression without sorting}
% \changes{7.2}{2006 Jan 12}{Add compatibility with \texttt{citeref} package}
% \changes{7.3}{2006 Mar 22}{Revise and update the manual documentation}
% \changes{7.4}{2006 Aug 18}{Add \cs{NAT@nmfmt} to names in \cs{NAT@test}}
% \changes{7.4a}{2006 Sep 6}{Fix bug with compress option and hyperref with dvips}
% \changes{7.5}{2007 Feb 2}{Add \cs{citenum} to print (non-superscripted) number}
% \changes{7.5}{2007 Feb 2}{Superscripted braces raised in textual citation too}
% \changes{7.5}{2007 Feb 2}{Change notes for textual numerical citations to be outside}
% \changes{8.0}{2007 Feb 2}{Allow changes in cite style, for chapterbib; remove \texttt{nopreonly} option}
% \changes{8.0}{2007 Feb 5}{Remove 2.09 support}
% \changes{8.0}{2007 Feb 5}{Remove subpackage option (and agu, egs options)}
% \changes{8.1}{2007 Oct 30}{Replace some \cs{edef}s with \cs{protected@edef}}
% \changes{8.2}{2008 Jan 10}{(AO)Introduce, for \texttt{merge} package option,
%    \cs{NAT@bibitem@first@sw} and \cs{NAT@bibitem@label@sw}}
% \changes{8.2}{2008 Jan 10}{(AO) The sort algorithm had not been stable; fixed.}%
% \changes{8.2}{2008 Jan 10}{(AO) Various changes to \texttt{NAT@sort@cites} and friends}%
% \changes{8.2}{2008 Jun 26}{(AO) Employ \cs{NAT@ifcat@num} to make the test on \cs{NAT@num}}%
% \changes{8.2}{2008 Jun 26}{(AO) Use \cs{NAT@space}, \cs{NAT@spacechar}, and \cs{NAT@penalty}
%     instead of explicit space and primitive penalty in \cs{NAT@idxtxt},
%     \cs{NAT@cite}, \cs{NAT@citenum}, \cs{NAT@citesuper}.}%
% \changes{8.2}{2008 Jun 28}{(AO) Introduce \cs{NAT@ifcat@num}, ensuring that the
%      \cs{catcode} of the underscore is 8 at the time;
%      use for tests on \cs{NAT@num} and \cs{NAT@last@num}.}%
% \changes{8.2}{2008 Jul 01}{(AO) Allow graceful transition away from the use of \texttt{natbib}}%
% \changes{8.2}{2008 Jul 01}{(AO) Assign \cs{NAT@ctype} with \cs{let} \cs{z@}:
%      allow for tighter \cs{ifnum} comparisons.}%
% \changes{8.2}{2008 Jul 01}{(AO) Give \cs{NAT@split} a good argument,
%       even when \cs{NAT@temp} is poorly constructed.}%
% \changes{8.2}{2008 Jul 01}{(AO) Provide a layer of abstraction to assignments
%       to \cs{@citea}, using \cs{NAT@def@citea} and \cs{NAT@reset@citea}.}%
% \changes{8.2}{2008 Jul 01}{(AO) With our abstraction of \cs{@citea};
%       we use wrappers \cs{NAT@def@citea@box} and \cs{NAT@hyper@citea}. Also \cs{NAT@penalty} in place of an explicit \cs{penalty}.}%
% \changes{8.2}{2008 Jul 01}{(AO) Use \cs{NAT@hyper@} and \cs{NAT@hyper@citea}
%       to wrap up the hyperlink calls in \cs{NAT@citexnum}, \cs{NAT@citex}, .}%
% \changes{8.2}{2008 Jul 02}{(AO) Add \cs{@ifxundefined}, a tool for testing a \cs{TeX} macro,
%       and \cs{@ifnum}, a tool for testing numbers, like \cs{ifnum}.}%
% \changes{8.2}{2008 Jul 02}{(AO) Employ \cs{@ifxundefined}, instead of \cs{@ifundefined},
%       for use on \cs{@cprwrite}, \cs{@indexfile}, \cs{bbl@redefine}, \cs{chapter},
%       \cs{NAT@sectionbib}, and \cs{bib@heading}: the \cs{csname} being tested ought not to be altered as a side effect.}%
% \changes{8.2}{2008 Jul 02}{(AO) The value of \cs{NAT@sort} and \cs{NAT@cmprs}
%       will be \cs{z@} or \cs{@ne}: something created by \cs{chardef}. This works better in \cs{ifnum} tests.}%
% \changes{8.2}{2008 Jul 12}{(AO) Do not write .aux file entries in \cs{NAT@citexnum}
%       or \cs{NAT@citex}; do this in \cs{NAT@sort@cites} where the keys will be in the user's order.}
% \changes{8.2}{2008 Jul 13}{(AO) Allow optional arguments preceding cite key.}
% \changes{8.2}{2008 Jul 13}{(AO) Commented-out code has been made into a comment.}
% \changes{8.2}{2008 Jul 13}{(AO) Protect against case where \cs{NAT@num} is
%       defined to be the same as \cs{@empty} (malformed \texttt{.aux} file).}
% \changes{8.3}{2008 Aug 28}{Refine the compatibility with babel}
% \changes{8.3}{2008 Sep 23}{Fix problem with spacing and raised commas for multiple superscripts}
% \changes{8.3}{2008 Nov 5}{Repair a number of bugs from AO's coding}
% \changes{8.3}{2008 Dec 8}{Put all comments inside braces with \cs{citet},
%    even for numerical (previously only for author--year)}
% \changes{8.3}{2009 Feb 2}{Include AO's last delta corrections}
% \changes{8.31}{2009 Jul 16}{Fix so when merge is 0, old syntax valid; backward compatibility}
% \changes{8.31a}{2009 Nov 07}{(AO) Fix punctuation bugs in merge code}
% \changes{8.31b}{2010 Sep 13}{Remove definitions of \cs{bibAnnote} and \cs{bibAnnoteFile} when merging not selected}
%
% \CheckSum{2884}
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
%<driver>%\documentclass[twoside]{ltxdoc}
%<driver>%\documentclass[a4paper]{ltxdoc}
%<driver>%\documentclass[twoside,a4paper]{ltxdoc}
\raggedbottom

 %** To include the detailed explanation of the coding, comment out
 %**   the next line
\OnlyDescription

 %** To produce a command index: add the following line for one run,
 %**   then run  makeindex -s gind.ist natbib
 %**   and reprocess, with or without this line (much faster without)
%<driver>% \EnableCrossrefs\CodelineIndex

 %** To produce a change history: add the following line for one run,
 %**   then run  makeindex -s gglo.ist -o natbib.gls natbib.glo
 %**   and reprocess, with or without this line (faster without)
%<driver>% \RecordChanges

\DisableCrossrefs %May stay; zapped by \EnableCrossrefs
\CodelineNumbered %May stay

\usepackage[UTF8, linespread = 1.2, fontset = founder]{ctex}
\usepackage{indentfirst}
\usepackage{hyperref}

\providecommand{\pkg}{\textsf}
\providecommand{\bst}{\textsf}
\providecommand{\file}{\textsf}
\providecommand{\opt}{\texttt}
\providecommand{\citekey}{\texttt}
\providecommand{\env}{\texttt}
\newcommand{\Marg}[1]{\texttt{\textbraceleft #1\textbraceright}}
\newcommand{\Oarg}[1]{\texttt{[#1]}}
\newcommand{\rmk}{\par\medskip\noindent\makebox[0pt][r]{\textbf{注：}}}
\begin{document}
   \DocInput{natbib.tex}
\end{document}
%</driver>
%\fi
%
\DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs}
\DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo}
\DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}
\DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage}
\DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage}
\DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions}
\DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument}
\DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError}
\DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine}
\DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak}
\DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand}
\DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment}
\DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength}
\DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi}
\DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc,\reset@font}
\DoNotIndex{\textup,\textit,\textmd,\textsf,\emph,\futurelet}
\DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape}
\DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe}
\DoNotIndex{\filename,\fileversion,\filedate,\let,\makeindex}
\DoNotIndex{\@auxout,\@for,\@gobble,\@ifnextchar,\@m,\@mkboth,\@nil}
\DoNotIndex{\@noitemerr,\@tempa,\@tempswafalse,\@tempswatrue,\@warning}
\DoNotIndex{\advance,\arabic,\AtBeginDocument,\bf,\bibname,\chapter}
\DoNotIndex{\citation,\clubpenalty,\CodelineNumbered,\csname}
\DoNotIndex{\DisableCrossrefs,\do,\edef,\else,\endcsname,\endlist}
\DoNotIndex{\expandafter,\fi,\gdef,\global,\hbox,\hfill,\hskip,\hspace}
\DoNotIndex{\if,\if@filesw,\if@tempswa,\ifx,\immediate,\itemindent,\labelsep}
\DoNotIndex{\labelwidth,\lastskip,\leftmargin,\list,\mbox,\newblock}
\DoNotIndex{\newpage,\p@enumiv,\parindent,\penalty,\refname}
\DoNotIndex{\relax,\section,\settowidth,\sfcode,\sloppy,\small,\string}
\DoNotIndex{\theenumiv,\thepage,\unskip,\uppercase,\usecounter,\vskip}
\DoNotIndex{\widowpenalty,\write,\xdef,\z@,\catcode,\ifnum,\the}
\DoNotIndex{\.,\@empty,\@ifundefined,\@latex@warning,\@minus,\@plus,\ }
\DoNotIndex{\document,\@namedef,\@listi,\markboth,\or,\p@}
\DoNotIndex{\listparindent,\noexpand,\par,\parsep,\pb,\pbf,\pbfseries}
\DoNotIndex{\pc,\pd,\pem,\pit,\pitshape,\pmdseries,\prm,\prmfamily,\psc}
\DoNotIndex{\pscshape,\psf,\psffamily,\psl,\pslshape,\ptt,\pttfamily}
\DoNotIndex{\pupshape,\@iden,\@firstofone,\@unexpandable@protect}
\DoNotIndex{\&,\{,\},\bibitem,\bibindent,\if@draft,\typeout}
\DoNotIndex{\@ifclassloaded,\@ifstar,\@onlypreamble,\@preamblecmds}
\DoNotIndex{\addtolength,\endinput,\@bsphack,\begingroup,\@wrindex}
\DoNotIndex{\@listctr,\bibname,\enddocument,\hfil,\ignorespaces,\item}
\DoNotIndex{\NAT@temp,\refname,\stepcounter,\@ifpackageloaded}
\DoNotIndex{\@gobbletwo,\index,\itemsep,\markright,\scriptsize}
\DoNotIndex{\textsuperscript,\@undefined}
\DoNotIndex{\@celt,\@cite@list,\@citea,\@citeb,\@compress@cite}
\DoNotIndex{\@bsphack,\@esphack,\@h@ld,\@make@cite@list,\@ne}
\DoNotIndex{\@sort@celt,\@tempcnta,\@tempcntb,\delimiter,\endgroup}
\DoNotIndex{\ifcat,\m@ne,\number,\kern,\protected@edef}
\DoNotIndex{\@markboth,\@mkboth,\nobreak,\SK@,\SK@@citex}
\DoNotIndex{\SK@@label,\SK@@ref,SK@def,\SK@lbibitem}
\DoNotIndex{\@nameuse,\@extra@b@citeb,\@tempb,\@tempc}

\setcounter{IndexColumns}{2}
\setlength{\IndexMin}{10cm}
\setcounter{StandardModuleDepth}{1}

\hyphenation{par-en-the-ti-cal}

\GetFileInfo{natbib}

\title{{\bfseries 自然科学引用与参考文献}\\
        (作者--年份模式与数字模式)}

\author{Patrick W. Daly\thanks{%
  模仿 \pkg{mcite} 宏包实现之数字参考文献合并之代码，由 Arthur Ogawa 提供，
  并已获得 美国物理协会 之授权。}\and Liam Huang\thanks{%
    \url{http://liamhuang.me/about}%
  }}

\date{本文乃 \pkg{\filename} 宏包之手册\\
      对应版本：\fileversion{}（\filedate）}

\maketitle

\pagestyle{myheadings}
\markboth{P. W. Daly\quad Liam Huang}{自然科学引用与参考文献}

\newcommand{\btx}{\textsc{Bib}\TeX}
\newcommand{\thestyle}{\textsf{\filename}}


^^A In order to keep all marginal notes on the one (left) side:
^^A (otherwise they switch sides disasterously with twoside option)
\makeatletter \@mparswitchfalse \makeatother

\renewcommand{\abstractname}{简介}
\begin{abstract}

\thestyle\ 宏包重新实现了 \LaTeX\ 标准的 \cs{cite} 命令。
新定义的命令同时支持「作者--年份模式」和「数字模式」两种引用方式。
\thestyle{} 与标准的 \pkg{bst} 文件兼容（如 \texttt{plain.bst}），
同时也能兼容 \texttt{harvard}、\texttt{apalike}、\texttt{chicago}、
\texttt{astron} 和 \texttt{authordate} 等 \pkg{bst} 文件。
当然，也能兼容 \thestyle{} 本身。

与上述宏包不同，\thestyle{} 宏包同时支持作者--年份模式和标准的数字模式两种引用方式。
实际上，\thestyle{} 还能在引入作者--年份样式的同时，输出标准的数字模式。
这使得在两种模式之间切换变得相当简单。
为此，\thestyle{} 还提供了一些 \pkg{.bst} 文件，用以替换 \LaTeX{} 标准的 \pkg{.bst}。

你可以用 \thestyle{} 定义不同的引用\emph{风格}（例如：括号的样式、相邻引用之间的标点）。
\thestyle{} 宏包还允许你将这些风格和 \pkg{.bst} 的名字关联起来，在使用特定 \pkg{.bst}
的时候启用特定的风格。
你也可以通过配置 \thestyle\pkg{.cfg} 文件，来为本地 \pkg{.bst} 配置引用风格。

\thestyle{} 宏包与下列宏包兼容：\pkg{babel}、\pkg{index}、\pkg{citeref}、
\pkg{showkeys}、\pkg{chapterbib}、\pkg{hyperref}、\pkg{koma} 以及
\pkg{amsbook} 和 \pkg{amsart} 文档类。
\thestyle{} 宏包可以实现 \pkg{cite} 宏包的排序和压缩功能，也能实现 Thorsten Ohl 的
\pkg{mcite} 宏包的多重引用合并功能。但是 \thestyle{} 宏包和这两个宏包并不兼容。

注意，使用 \pkg{citeref} 宏包（以添加引用条目在参考文献中的页码）时，该宏包必须在加载
\thestyle{} 宏包之后引入。\pkg{hyperref} 宏包的 \opt{pagebackref} 选项也提供了
这一功能，并且带有超链接。

综上，\thestyle{} 宏包提供了对大多数参考文献样式的单一可扩展接口。
\end{abstract}

\newpage\tableofcontents\newpage

\section{介绍}

\thestyle{} 宏包扩展了 \LaTeX{} 的参考文献引用能力，支持数字模式的引用和
作者--年份引用模式的引用。
标准的 \LaTeX{} 只提供了数字模式的引用，而在 \thestyle{} 发布的 1993 年之前，所有
提供作者--年份引用模式的宏包，通常都是通过添加新的命令来支持作者--年份引用模式。
由于这一限制，使用这些宏包的书写的文档在后续修改之时，很难改变引用模式。

\thestyle{} 宏包的出现改变了这一现状；使用 \thestyle{} 宏包的文档在作者--年份模式与
数字引用模式之间的切换非常简单，只需要修改宏包选项即可，不需要做任何额外的改动。
\thestyle{} 宏包已作为标准 \LaTeX{} 的一部分随之安装，并且支持许多期刊（同时也被这些期刊
作为依赖）。大多数 \LaTeX{} 社区选择 \thestyle{} 宏包，主要就是因为 \thestyle{} 宏包
的灵活性和可定制性。

和其他宏包一样，\thestyle{} 宏包需要在文章导言区中加载，例如：
\begin{quote}
  |\usepackage[sectionbib,square]{natbib}|
\end{quote}
开启 \opt{sectionbib} 选项时，载入 \pkg{chapterbib} 宏包，则参考文献列表将出现在每一个
章节之后（参阅~\ref{sec:chapbib}）。\opt{square} 选项则指明文中引用时，
引用记号将放在一对方括号中，而不是一对圆括号中。第 \ref{sec:opts} 节列出了所有可用的选项。

本文档在正文开始处使用了如下参考文献格式，
\begin{quote}
\begin{verbatim}
\begin{document}
\bibliographystyle{plainnat}
\end{verbatim}
\end{quote}
此处，我们通过 \cs{bibliographystyle} 命令选择 \bst{plainnat} 为参考文献格式，\btx{}
将会据此从数据库中抽取数据生成实际的参考文献列表。\bst{plainnat} 是 \thestyle{} 风格的
\bst{plain} 格式，只支持数字引用模式。第~\ref{sec:plainnat} 节列出了所有可用的参考文献格式文件（\file{.bst} 文件）。

\cs{bibliographystyle} 命令可以放在文档的任何位置，但放在正文开始处更加清晰明了且易于修改。

在文章中，可以使用下列命令生成参考文献引用：
\begin{quote}
  \cs{citep}\Marg{jon90} 生成解释性的引用，如 (Jones et al.
  1990),\\
  \cs{citet}\Marg{jon90} 生成文本类的引用，如 Jones et al. (1990)
\end{quote}
\cs{citep} 和 \cs{citet} 都是 \thestyle{} 定义的命令，而非 \LaTeX{} 的标准命令。
应当避免使用 \LaTeX{} 的标准命令 \cs{cite}。\cs{cite} 命令在作者--年份引用模式下行为
和 \cs{citet} 命令相似，而在数字引用模式下行为与 \cs{citep} 命令相似。
第~\ref{sec:excite} 节列出了其他有用的命令。

这些例子中，\citekey{jon90} 是文献的引用标签。这一标签应与 \btx{} 数据库中的标签对应，或与
\env{thebibliography} 环境中的标签对应（参见第~\ref{sec:bibitem} 节）：
\begin{quote}
\begin{verbatim}
\begin{thebibliography}{1}
  \bibitem[Jones et al.(1990)]{jon90}
  . . . . .
\end{thebibliography}
\end{verbatim}
\end{quote}
该环境是实际生成参考文献列表的环境。\cs{bibitem} 通过引用标签（\citekey{jon90}）
将参考文献列表中的文献条目与正文中的引用联系起来。
引用标签可以任意指定，唯一的要求就是每个标签都是唯一的。
方括号中的内容包含一些引用信息，这里作者是 \texttt{Jones et al.}
年份是 \texttt{1990}。注意，这是两部分信息，它们可以根据不同的引用命令以不同形式组合在
一起。
实际上，如果文章使用的是数字引用模式，方括号中的这部分信息将会被忽略。

你可以手写 \env{thebibliography} 环境的内容，但更好也更安全的做法是使用 \btx{} 生成
它。为此，除了使用已经提到的 \cs{bibliographystyle} 命令之外，在文章末尾还应该使用：
\begin{quote}
\begin{verbatim}
\bibliography{mybib}
\end{document}
\end{verbatim}
\end{quote}
这里，\file{mybib} 是 \btx{} 数据库的文件名（不含扩展名，即 \file{mybib.bib} 中
的 \file{mybib} 部分），它包含文档所需的参考文献数据。

剩下的内容，将会介绍关于 \thestyle{} 宏包所有细节。

\section{使用宏包}
\label{sec:usage}

这里首先对几个名词做区分。本文档中，\emph{模式}指的是引用文献时的展示方式
（比如作者--年份模式、数字模式）；\emph{风格}指的是引用文献时的标点风格；\emph{格式}指的是
\file{.bst} 文件及其定义的内容。

引用风格需要由宏包控制，而不是由 \file{.bst} 格式文件控制。

\subsection{新的参考文献格式}
\label{sec:plainnat}

\thestyle{} 提供了三个新的 \file{.bst} 格式文件，用以取代标准 \LaTeX{} 的数字引用模式的
格式文件。
\begin{quote}\ttfamily
 plainnat.bst \qquad abbrvnat.bst \qquad unsrtnat.bst
\end{quote}

这些格式文件效果与相应的标准格式文件相似，但能与 \thestyle{} 兼容。
使用这些格式文件的好处在于，他们同时支持作者--年份模式和数字引用模式。

除去这些 \file{.bst} 文件之外，还有其他一些格式文件能与 \thestyle{} 兼容。
你也可以使用 \file{makebst} 来生成自己的格式文件。

\subsection{\env{thebibliography} 环境的语法}
\label{sec:bibitem}

引用条目的作者信息和年份信息是由 \env{thebibliography} 环境中的 \cs{bibitem}
命令提供的。
为了让 \thestyle{} 宏包正确工作，这些信息必须遵循固定的格式。与 \thestyle{} 宏包兼容的
参考文献格式文件（\file{.bst} 文件）会自动处理好这些格式。（如上述提到的三个新的参考文献格式
文件，又如 \pkg{harvard} 及 \pkg{chicago} 这些参考文献格式）
如果你不想使用 \btx{} 来处理参考文献，那么你必须按照 \thestyle{} 的要求自行书写
\env{thebibliography} 环境。

该环境的语法如下：
 \begin{quote}
 \cs{bibitem}\Oarg{Jones et al.(1990)}\Marg{jon90}\\[1ex]
 或者\\[1ex]
 \cs{bibitem}\Oarg{Jones et al.(1990)Jones, Baker, and Williams}\Marg{jon90}
 \end{quote}
方括号中的内容包含了一些引用信息：缩略的作者列表，\texttt{Jones et al.}；年份信息，
\texttt{1990}；以及可选的完整作者列表 \texttt{Jones, Baker and Williams}。
如果完整作者列表为空，那么 \thestyle{} 就会使用缩略的作者列表。
圆括号本身\textbf{并不是}引用信息的一部分，但是将年份信息和作者信息分割开来。
在书写 \env{thebibliography} 时，圆括号是必须写出来的。即使你希望用方括号的引用风格，你也
需要写出这些圆括号区分作者信息和年份信息。
此外，圆括号的前后不能有任何空格；否则这些空格会作为作者列表的一部分。

\rmk 如果整个 \env{thebibliography} 环境中的 \cs{bibitem} 条目提供的信息不符合
\thestyle{} 宏包的要求，那么这条文献将被强制用数字模式输出。因为此时 \thestyle{} 无法
确定该文献的作者和年份信息。

\subsection{基本引用命令}

\thestyle{} 宏包可以与其他陈旧的宏包共同使用，比如 \pkg{harvard} 宏包。
不过，本节和下一节中描述的命令是 \thestyle{} 宏包定义的。如果你希望将 \thestyle{}
和其他宏包联用，那么你必须使用 \thestyle{} 宏包提供的这些命令。

\DescribeMacro{\citet}
\DescribeMacro{\citep}

\thestyle{} 宏包提供了两个基本的引用命令：\cs{citet} 和 \cs{citep}。前者生成文本类
的引用，后者生成解释性的引用。
带星号的版本 \cs{citet*} 和 \cs{citep*} 意义分别和 \cs{citet} 及 \cs{citep} 类似，
不过将输出完整作者列表，而不是缩略的作者列表。
这些命令可以接受一到两个可选参数，这些可选参数可以在引用的前后增加适当的内容。
\begin{quote}
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \cs{citet}\Marg{jon90}
    & Jones et al. (1990)\\
  \cs{citet}\Oarg{chap.~2}\Marg{jon90}
    & Jones et al. (1990, chap.~2)\\[0.5ex]
  \cs{citep}\Marg{jon90}
    & (Jones et al., 1990)\\
  \cs{citep}\Oarg{chap.~2}\Marg{jon90}
    & (Jones et al., 1990, chap.~2)\\
  \cs{citep}\Oarg{see}\Oarg{}\Marg{jon90}
    & (see Jones et al., 1990)\\
  \cs{citep}\Oarg{see}\Oarg{chap.~2}\Marg{jon90}
    & (see Jones et al., 1990, chap.~2)\\[0.5ex]
  \cs{citet*}\Marg{jon90}
    & Jones, Baker, and Williams (1990)\\
  \cs{citep*}\Marg{jon90}
    & (Jones, Baker, and Williams, 1990)
\end{tabular}
\end{quote}

带星号的版本只有在 \file{.bst} 文件支持的情况下才会输出完整的作者列表，
否则，就只会输出缩略的作者列表。

标准 \LaTeX{} 中，\cs{cite} 命令只能接受一个可选参数，用于将适当的文本加在引用之后。
在这里，单个的可选参数将文本加于引用之后；两个可选参数则分别将文本加于引用之前和之后。
如果只想在引用之前加些内容，那么必须像上面那样，将第二个可选参数留空。

\ref{sec:excite} 节介绍了功能更为强大的 \cs{citetext} 命令，可以完成更复杂的
文本和引用风格。

如果你想同时引用多条文献，只需要在 \cs{cite} 命令中输入多个参考文献引用标签。
\textsl{如果相邻的引用相同作者在不同年份发表的不同文章，那么作者名字只会输出一次。}

\begin{quote}
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \cs{citet}\Marg{jon90,jam91} & Jones et al. (1990); James et al. (1991)\\
  \cs{citep}\Marg{jon90,jam91} & (Jones et al., 1990; James et al. 1991)\\
  \cs{citep}\Marg{jon90,jon91} & (Jones et al., 1990, 1991)\\
  \cs{citep}\Marg{jon90a,jon90b} & (Jones et al., 1990a,b)
\end{tabular}
\end{quote}

上述是在作者--年份模式下的输出结果。在数字引用模式下，结果稍有不同。
\begin{quote}
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  |\citet{jon90}| & Jones et al. [21]\\
  |\citet[chap.~2]{jon90}| & Jones et al. [21, chap.~2]\\[0.5ex]
  |\citep{jon90}| & [21]\\
  |\citep[chap.~2]{jon90}| & [21, chap.~2]\\
  |\citep[see][]{jon90}| & [see 21]\\
  |\citep[see][chap.~2]{jon90}| & [see 21, chap.~2]\\[0.5ex]
  |\citep{jon90a,jon90b}| & [21, 32]
\end{tabular}
\end{quote}

当且仅当 \file{.bst} 文件支持作者--年份模式时，作者信息才会出现在 \LaTeX{} 输出
结果汇总。标准的 \file{.bst} 文件（如 \file{plain.bst}）只支持数字格式的引用，
而不会将作者名字信息传递给 \LaTeX{}。因此，在这种情况下 \cs{citet} 会输出形如
``\textbf{(author?)} [21].'' 的结果。

\DescribeMacro{\cite}
在 \thestyle{} 宏包的早期版本中，传统的 \cs{cite} 命令可同时用于文本类的引用
和解释性的引用。
^^A 存疑
^^A The presence of an empty optional text in square brackets
^^A signalled parenthetical.
这种情况下，使用一对空的方括号可以生成解释性的引用，即
\cs{cite}\Oarg{}\Marg{引用标签列表} 的效果等于 \cs{citep}\Marg{引用标签列表}。
出于兼容性考虑，这种用法依旧可用，但不推荐。

也就是说，不带说明信息的 \cs{cite} 命令在作者--年份模式下与 \cs{citet} 的效果相同；
在数字引用模式下，与 \cs{citep} 的效果相同。
带星号的版本，以及带有一个或两个说明信息的版本，有类似用法。

同时引用多条文献时，使用 \opt{sort} 选项可以让引用按照参考文献列表中的顺序排列，而不是
按照 \cs{cite} 命令中的引用标签列表中的顺序排列。参看 \ref{sec:sort} 节。

有些出版商要求，在第一次引用某条参考文献时需要给出全部作者的列表，在随后对该文献的引用则只需
给出缩略的作者列表。使用 \ref{sec:long} 节的 \opt{longnamesfirst} 可以实现该效果。

\subsection{高级引用命令}
\label{sec:excite}

\DescribeMacro{\citealt}
\DescribeMacro{\citealp}

\cs{citealt} 和 \cs{citealp} 命令分别是 \cs{citet} 和 \cs{citep} 的另一种形式，
他们输出的模式和格式相同，仅在风格上有不同。\cs{citealt} 和 \cs{citealp} 不会输出用于
解释说明的括号。

\DescribeMacro{\citenum}
\cs{citenum} 命令输出参考文献在文献列表中的编号数字，但不输出括号（在作者年份--模式下也
是如此），也不输出上标形式。也就是说，这个命令可以将参考文献编号以正常文本的形式输出。

\DescribeMacro{\citetext}
\cs{citetext} 命令可以在当前引用的括号内插入任意的补充信息。这个命令可以与 \cs{citealp}
联用，比如：
\begin{verbatim}
\citetext{see \citealp{jon90}, or even better \citealp{jam91}}
\end{verbatim}
产生的效果是：(see Jones et al., 1990, or even better James et al., 1991)。

除了 \cs{citenum} 之外，这些命令均支持：同时引用多条文献、添加说明信息以及带星号的版本。

\begin{quote}
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \cs{citealt}\Marg{jon90} & Jones et al.\ 1990\\
  \cs{citealt*}\Marg{jon90} & Jones, Baker, and Williams 1990\\
  \cs{citealp}\Marg{jon90} & Jones et al., 1990\\
  \cs{citealp*}\Marg{jon90} & Jones, Baker, and Williams, 1990\\
  \cs{citealp}\Marg{jon90,jam91} & Jones et al., 1990; James et al., 1991\\
  \cs{citealp}\Oarg{pg.~32}\Marg{jon90} & Jones et al., 1990, pg.~32\\
  \cs{citenum}\Marg{jon90} & 11\\
  \cs{citetext}\Marg{priv.\ comm.} & (priv.\ comm.)
\end{tabular}
\end{quote}

\DescribeMacro{\citeauthor}
\DescribeMacro{\citeyear}
\DescribeMacro{\citeyearpar}

在作者--年份模式下，有时也会需要只引用作者而不显示年份，或者反过来只显示年份而不显示作者。
你可以用到这些命令：
\begin{quote}
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \cs{citeauthor}\Marg{jon90} & Jones et al.\\
  \cs{citeauthor}*\Marg{jon90} & Jones, Baker, and Williams\\
  \cs{citeyear}\Marg{jon90}   & 1990\\
  \cs{citeyearpar}\Marg{jon90} & (1990)
\end{tabular}
\end{quote}

\DescribeMacro{\citefullauthor}
同时，也有定义命令 \cs{citefullauthor}，其作用与 \cs{citeauthor*} 相同。

如果 \cs{bibitem} 中缺少完整的作者列表，那么 \cs{citeauthor*} 的效果与
\cs{citeauthor} 的效果相同，也就是说只会输出缩略的作者列表。
\cs{citet} 和 \cs{citep} 的相应版本与此同理。

如果缺少作者或年份信息（比如使用标准的 \LaTeX{} \file{.bst} 文件），这些命令会
产生警告（Warning）信息。

\rmk

these commands may also be used with numerical
citations, provided an author--year \texttt{.bst} file is being employed.

\rmk
所有的 \cs{cite..} 命令都有相似的语法，可以同时引用多条文献，也都有两个补充信息的参数
（不过 \cs{citeyear} 和 \cs{citenum} 没有带星号的版本）。虽然通常没必要给 \cs{citeyear}
和 \cs{citeauthor} 添加补充信息，尤其是在同时引用多条文献的时候；但是确实可以通过两个
可选参数给他们添加上补充信息——虽然看起来会怪怪的。例如，在数字引用模式下，补充信息将被直接
忽略；在作者--年份模式下，只有引用标记后的补充信息才会被接受。
此外，我也不推荐用 \cs{citet} 命令引用多条文献。在使用 \cs{citet} 引用多条文献时，
补充信息将会被加在整个引用标记的前后。这确实是个问题，但是没必要花精力修复这种无所谓的事情。

总而言之，补充信息最好只用于 \cs{citep} 命令；或者在作者--年份模式下用于引用单一文献的
\cs{citet} 命令。其他情况下，使用补充信息可能造成各种奇怪的问题。

\DescribeMacro{\Citet}
\DescribeMacro{\Citep}
\DescribeMacro{\Citealt}
\DescribeMacro{\Citealp}
\DescribeMacro{\Citeauthor}
\subsection{Forcing Upper Cased Name}

If the first author's name contains a \textsl{von} part, such as ``della
Robbia'', then |\citet{dRob98}| produces ``della Robbia (1998)'', even at the
beginning of a sentence. One can force the first letter to be in upper case
with the command |\Citet| instead. Other upper case commands also exist.
\begin{quote}
\begin{tabular}{rl@{\quad$\Rightarrow$\quad}l}
when & |\citet{dRob98}| & della Robbia (1998) \\
then & |\Citet{dRob98}| & Della Robbia (1998) \\
   &   |\Citep{dRob98}| & (Della Robbia, 1998) \\
   &   |\Citealt{dRob98}| & Della Robbia 1998 \\
   &   |\Citealp{dRob98}| & Della Robbia, 1998 \\
   &   |\Citeauthor{dRob98}| & Della Robbia
\end{tabular}
\end{quote}
These commands also exist in starred versions for full author names.

\medskip\noindent
\textbf{Note:} the coding for the upper casing commands is tricky and likely
buggy. It operates on the names that are stored in the |\bibitem| entry, and
works even if old style font commands are used; however, \LaTeXe\ commands will
cause it to crash. Thus\\
\begin{tabular}[t]{ll}
 |\bibitem[{\it della Robbia}(1998)]{dRob98}| & is okay, but \\
 |\bibitem[\textit{della Robbia}(1998)]{dRob98}| & crashes.
\end{tabular}
^^A I hope to improve this situation in future.


\subsection{Citation Aliasing}
\DescribeMacro{\defcitealias}
\DescribeMacro{\citetalias}
\DescribeMacro{\citepalias}

Sometimes one wants to refer to a reference with a special designation,
rather than by the authors, i.e. as Paper~I, Paper~II. Such aliases can be
defined and used, textual and/or parenthetical with:
\begin{quote}
\begin{tabular}{lcl}
|\defcitealias{jon90}{Paper~I}|\\
|\citetalias{jon90}| & $\Rightarrow$ & Paper~I\\
|\citepalias{jon90}| & $\Rightarrow$ & (Paper~I)
\end{tabular}
\end{quote}
These citation commands function much like |\citet| and |\citep|: they may
take multiple keys in the argument, may contain notes, and are marked as
hyperlinks.


A warning is issued if the alias is used before it is defined, or if an alias
is redefined for a given citation. No warning is issued if an alias is
defined for a citation key that does not exist; the warning comes when it is
used!

See Section~\ref{sec:yearless} for an alternative means of citing with
a code name.

\subsection{Authorless and Yearless References}\label{sec:yearless}
What does one do about references that do not have authors? This has long
bothered me but I do have a suggestion. Standard \btx\ styles make use of a
\texttt{KEY} field in the entries to be used for alphabetizing when the
authors or editors are missing. The author--year styles go even further and
insert the \texttt{KEY} field in place of the authors. One can imagine giving
a code designation for the work at this point. For example,
\begin{quote}
\begin{verbatim}
@MANUAL{handbk98,
 title = {Assembling Computers},
 year = 1998,
 organization = {MacroHard Inc.},
 key = "MH-MAN"
}
\end{verbatim}
\end{quote}
With \texttt{plain}, the key text \texttt{MH-MAN} is used only to order the
reference, but with \texttt{plainnat} and other author--year styles, it is
used in place of the authors. One can then refer to it as
|\citeauthor{handbk98}| to get MH-MAN or as |\citetext{\citeauthor{handbk98}}|
for (MH-MAN), a parenthetical citation.

This can be greatly simplified if
the bibliography style leaves the date blank in the |\bibitem|
entry, as
\begin{quote}
|\bibitem[MH-MAN()]{handbk98}|
\end{quote}
for then \thestyle\ suppresses the date, preceding punctuation, and the
braces for |\citet|. This means that |\citet| and |\citep| behave
automatically like the two examples above.
The date still may appear in the text of the reference.

The \thestyle\ bibliography styles have been modified accordingly to omit
the date from the |\bibitem| entry when missing authors and/or editors
are replaced by key text.

Similarly, if the year is missing, it will be left blank in the |\bibitem|
entry; thus citing such a work will only produce the authors' names.

\medskip\noindent
\textbf{Note:} there are many other possibilities with this feature. One can
even produce citations like those of the \texttt{alpha} bibliography style,
by placing the citation code in place of the authors in the |\bibitem| entry
and leaving the year blank. A second code (or maybe even the authors
themselves) could be placed where the full author list normally appears, to
be printed with the starred version of the |\cite| commands. For example,
\begin{quote}
|\bibitem[MH-MAN()MacroHard Inc.]{handbk98}|
\end{quote}

\subsection{Extra Features in the \texttt{plainnat} Family}\label{sec:url}

The special \texttt{.bst} files for \thestyle\ mentioned in
Section~\ref{sec:plainnat} have a number of extra fields compared to the
original files: \\
\begin{tabular}{lp{10.5cm}}
\texttt{ISBN} & for the ISBN number in books,\\
\texttt{ISSN} & for the ISSN number in periodicals,\\
\texttt{URL} & for the Internet address of online documents,\\
\texttt{DOI} & the \emph{Digital Object Identifier} now being used by many
       journals as a more robust alternative to URL,\\
\texttt{EID} & \emph{electronic ID}, a substitute for page numbers for online journals
       that also appear in print; also known as the \emph{sequence number}
       within the paper volume.
\end{tabular}\\

Both the DOI and URL tend to be very long, causing ugly line breaks or
sticking out into the margin. This can be avoided by loading the \texttt{url}
package by Donald Arseneau, which allows text to be broken at punctuation
marks without a hyphen. This package is automatically detected by \thestyle{}
and appropriate commands redefined. URLs are printed in typewriter font, DOI
in roman. Without the \texttt{url} package, these numbers are never broken.

As pointed out in Section~\ref{sec:yearless}, the \texttt{KEY} field is
treated differently by \texttt{plainnat} than in \texttt{plain}. Whereas the
latter uses this field only to alphabetize entries without authors,
\texttt{plainnat} actually inserts it in place of the author, both in the
reference text and in the citation label (|\bibitem| entries). Furthermore,
the year is left empty in |\bibitem| so that |\citep| prints only the
``author'' text, which is now the \texttt{KEY}. This should be some code
designation for the work.

\subsection{Selecting Citation Punctuation}\label{sec:bibpunct}

\DescribeMacro{\setcitestyle}
The above examples have been printed with the default citation style.
It is possible to change this, as well as to select numerical or
author--year mode, by means of the |\setcitestyle| command, which takes as argument
a comma-separated list of keywords. (This command is new to version~8.)

\begin{itemize}
\item
Citation mode: |authoryear| or |numbers| or |super|
(corresponds to fourth argument of |\bibpunct|).
%^^A \ifNAT@numbers \ifNAT@super
\item
Braces: |round| or |square| or |open={|\emph{char}|},close={|\emph{char}|}|
(corresponds to first and second arguments of |\bibpunct|).
%^^A \NAT@open \NAT@close
\item
Between citations: |semicolon| or |comma| or |citesep={|\emph{char}|}|
(corresponds to third argument of |\bibpunct|).
%^^A \NAT@sep
\item
Between author and year: |aysep={|\emph{char}|}|
(corresponds to fifth argument of |\bibpunct|).
%^^A \NAT@aysep
\item
Between years with common author: |yysep={|\emph{char}|}|
(corresponds to sixth argument of |\bibpunct|).
%^^A \NAT@yrsep
\item
Text before post-note: |notesep={|\emph{text}|}|
(corresponds to optional argument of |\bibpunct|).
%^^A \NAT@cmt
\end{itemize}
Defaults are |authoryear|, |round|, |comma|, |aysep={;}|, |yysep={,}|,
|notesep={, }|

Example~1, |\setcitestyle{square,aysep={},yysep={;}}| changes the author--year
output of
\begin{quote}
|\citep{jon90,jon91,jam92}|
\end{quote}
into [Jones et al. 1990; 1991, James et al. 1992].

Example~2, |\setcitestyle{notesep={; },round,aysep={},yysep={;}}| changes the output of
\begin{quote}
|\citep[and references therein]{jon90}|
\end{quote}
into (Jones et al. 1990; and references therein).

\medskip\noindent
\textbf{Note}:
\begin{itemize}
 \item parameters not specified remain unchanged;
 \item the order of the keywords is unimportant;
 \item the punctuation between author and year applies only to author--year
   citations, not numerical;
 \item the |yysep| punctuation comes between years when multiple citations
   have the same, non-repeated authors; a space is always inserted
   as well; if the years too are same, the citation is printed as `2007a,b',
   without a space; to include a space, add it with |yysep={,~}|;
 \item for numerical citations with common authors, e.g,
   |\citet{jon90,jon91}| produces `Jones et al.\ [21, 22]' with the
   punctuation between the numbers; a space is automatically included for
   numbers, but not for superscripts.
 \item a single character does not really need to be in |{ }|,
    other than a comma; |yysep=;| is acceptable;
\end{itemize}

\DescribeMacro{\bibpunct}
The older command for setting the citation style is |\bibpunct|, which
takes one optional and six required arguments:
\begin{enumerate}
\item the opening bracket symbol, default = (
\item the closing bracket symbol, default = )
\item the punctuation between multiple citations, default = ;
\item the letter `n' for numerical style, or `s' for numerical superscript
     style, any other letter for
     author--year, default = author--year;
\item the punctuation that comes between the author names and the year
\item the punctuation that comes between years or numbers when common author
     lists are suppressed (default = ,);
\end{enumerate}

The optional argument is the character preceding a post-note, default is a
comma plus space. In redefining this character, one must include a space if
one is wanted.

The above |\setcitestyle| examples can be achieved with
\begin{quote}
|\bibpunct{[}{]}{,}{a}{}{;}| and\\
|\bibpunct[,~]{(}{)}{,}{a}{}{;}|.
\end{quote}


\subsection{Predefining a citation style}\label{sec:predef}

\DescribeMacro{\bibstyle@xxx}
\DescribeMacro{\citestyle}

If a particular set of citation punctuations is commonly used, it is possible
to store it in the local \thestyle\texttt{.cfg} and to recall it with
|\citestyle{|\emph{name}|}|. The
definition is done by creating a command |\bibstyle@|\emph{name}, which sets
the desired citation style.

For example, the American Geophysical Union (AGU) demands in its publications
that citations be made with square brackets and separated by semi-colons.
There is an \texttt{agu.bst} file to accomplish most of the formatting, but
such punctuations are not included in it. Instead, \thestyle{} has the
definition
\begin{quote}
|\newcommand{\bibstyle@agu}{\bibpunct{[}{]}{;}{a}{,}{,~}}|
\end{quote}
which allows this set to be selected with the command
\begin{quote}
|\citestyle{agu}|
\end{quote}

There is an additional feature to such predefined styles: \thestyle\ attempts
to execute |\citestyle| at the beginning of the document
with the name of the bibliography style, as given by
the |\bibliographystyle| command (and stored in the \texttt{.aux} file).
This means that a citation style can be
directly associated with a \texttt{.bst} file. Such implicit styles are
immediately overwritten by any explicit style specifications, such as package
options, or by |\setcitestyle|, |\bibpunct|, or |\citestyle| commands.

Predefined citation styles are contained within the \thestyle\ code for the
following bibliography styles:
\begin{description}
 \item[\texttt{plain}] etc. (the 4 base styles): square braces, numerical, commas
 \item[\texttt{plainnat}] etc.: square braces, author--year, commas
 \item[\texttt{agu}] (American Geophysical Union): square, author--year, semi-colon
 \item[\texttt{egu}] (European Geosciences Union): round, author--year, semi-colon
 \item[\texttt{agms, dcu, kluwer}] (Harvard set): round, author--year
 \item[\texttt{cospar}] (Committe on Space Research): slashes, numerical, comma
 \item[\texttt{nature}] (Journal \textsl{Nature}): superscripts
\end{description}
There are others but they are mainly for my personal convenience. The above
represent most of the major variations and can be used as required. The
automatic association with other bibliography styles can only be achieved by
putting the definitions into the local \thestyle\texttt{.cfg}.

Note that the predefinitions for |plain| and |plainnat| specify square
braces, thus changing the normal \thestyle\ default of round parentheses.

The style defining commands may contain more than just |\bibpunct|
or |\setcitestyle|.
Some numerical citation scheme require even more changes. For example,
\textsl{Nature} not only uses superscripted numbers for
citations, it also prints the numbers in the list of references without
the normal square brackets. To
accommodate this, \thestyle{} contains the style definition
\begin{quote}\begin{verbatim}
\newcommand{\bibstyle@nature}%
   {\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
    \renewcommand\bibnumfmt[1]{##1.}}
\end{verbatim}
\end{quote}
The redefined |\bibnumfmt| command specifies how the reference numbers
are to be formatted in the list of references itself.

\subsection{Priority of Style Commands}\label{sec:priority}
The citation style (punctuation and mode) can be selected by means of the
|\setcitestyle|, |\bibpunct|, |\citestyle| commands or via
|\bibliographystyle{|\textit{bst}|}| with a predefined |\bibstyle@|\textit{bst}.
They can also be selected by package options
(Section~\ref{sec:opts}). What happens if there are several conflicting
selections?

The lowest priority is assigned to the |\bibliographystyle|
command, since this is implicit and not transparent to the user. The
package options have the next priority. Finally, any selection by
|\setcitestyle|,
|\bibpunct| and/or |\citestyle| overrides those of the other methods.

\subsection{Other Formatting Options}


\DescribeMacro{\bibsection}
The list of references normally appears as a |\section*| or |\chapter*|,
depending on the main class. If one wants to redesign one's own heading,
say as a numbered section with |\section|, then |\bibsection| may be
redefined by the user accordingly.



\DescribeMacro{\bibpreamble}
A preamble appearing after the |\bibsection| heading may be inserted before
the actual list of references by redefining |\bibpreamble|. This will appear in
the normal text font unless it contains font declarations. The
|\bibfont| applies to the list of references, not to this preamble.



\DescribeMacro{\bibfont}
The list of references is normally printed in the same font size and
style as the main body. However, it is possible to redefine |\bibfont|
to be font commands that are in effect within the \texttt{thebibliography}
environment after any preamble. For example,
\begin{quote}
|\renewcommand{\bibfont}{\small}|
\end{quote}


\DescribeMacro{\citenumfont}
Numerical citations may be printed in a different font. Define |\citenumfont|
to be a font declaration like |\itshape| or even a command taking arguments
like |\textit|.
\begin{quote}
|\renewcommand{\citenumfont}[1]{\textit{#1}}|
\end{quote}
The above is better than |\itshape| since it automatically adds italic
correction.


\DescribeMacro{\bibnumfmt}
The format of the numerical listing in the reference list may also be changed
from the default [32] by redefining |\bibnumfmt|, for example
\begin{quote}
|\renewcommand{\bibnumfmt}[1]{\textbf{#1}:}|
\end{quote}
to achieve \textbf{32}: instead.


\DescribeMacro{\bibhang}
The list of references for author--year styles uses a hanging indentation
format: the first line of each reference is flush left, the following lines
are set with an indentation from the left margin. This indentation is 1~em
by default but may be changed by redefining (with |\setlength|) the
length parameter |\bibhang|.


\DescribeMacro{\bibsep}
The vertical spacing between references in the list, whether author--year
or numerical, is controlled by the length |\bibsep|. If this is set to
0~pt, there is no extra line spacing between references. The default
spacing depends on the font size selected in |\documentclass|, and is
almost a full blank line. Change this by redefining |\bibsep| with
|\setlength| command.



\subsection{Automatic Indexing of Citations}

\DescribeMacro{\citeindextrue}
\DescribeMacro{\citeindexfalse}

If one wishes to have the citations entered in the \texttt{.idx} indexing
file, it is only necessary to issue |\citeindextrue| at any point in the
document. All following |\cite| commands, of all variations, then insert
the corresponding entry to that file. With |\citeindexfalse|, these
entries will no longer be made.


The |\bibitem| commands in the \texttt{thebibliography} environment will
also make index entries. If this is not desired, then issue
|\citeindexfalse| before |\bibliography| or |\begin{thebibliography}|.

Of course, |\makeindex| must also be issued in the preamble to activate
indexing, as usual. Otherwise, no indexing is done at all.

Make sure that the document has been processed at least twice after the
last \btx\ run before running the \texttt{makeindex} program.

\DescribeMacro{\NAT@idxtxt}
The form of the index entries is set by the internal |\NAT@idxtxt|, which
can be redefined by hackers if wanted (in the \thestyle\texttt{.cfg} file
please). By default, it prints the short author list plus date or number in the
current parenthesis style and citation mode.

The \thestyle\ package can also be used with the \texttt{index} package of
David~M. Jones. The order in which the packages are loaded is not
important.

\DescribeMacro{\citeindextype}
In that package, multiple index lists may be made by means of a |\newindex|
command. For example, it may be desirable to put all the citation indexing
into a separate list. First that list must be initiated with, e.g.,
\begin{quote}
  |\newindex{cite}{ctx}{cnd}{List of Citations}|
\end{quote}
and then the automatic citation indexing associated with this list with the
\thestyle\ command
\begin{quote}
  |\renewcommand{\citeindextype}{cite}|
\end{quote}
See the documentation for \texttt{index.sty} for details.

\subsection{Hyper\TeX\ Compatibility}
The \thestyle\ package is compatible with the \texttt{hyperref}
package of Sebastian Rahtz and Heiko Oberdiek.
, for use with
\LaTeX\ $\rightarrow$ HTML conversions, pdf\TeX, \texttt{pdfmark}.
The compatibility is of a mutual nature: both packages contain
coding that interact with that of the other.

There is a special option to the \texttt{hyperref} package: \texttt{breaklinks}
which allows the link text to be split over to the next
line, avoiding many overfull line messages. By default, the link text is
restricted to be on one line. For numerical citations, this may be desirable,
but for author--year ones with long link texts, it is not.

\subsection{Multiple Bibliographies in One Document}\label{sec:chapbib}


The \thestyle\ package is compatible with the \texttt{chapterbib} package
of Donald Arseneau and Niel Kempson,
which makes it possible to have several bibliographies in one document.
The usual application is to have bibliographies in each chapter of a book,
especially if they have been written by different authors.

The \texttt{chapterbib} package works in a very natural way for the
author; only the editor who puts all the chapters together into one book
has to do some extra work.

The package makes use of the |\include| command, and each |\include|d file
has its own bibliography.
For large books, it makes very good sense to take advantage of this feature
in any case.

To review the use of |\include|, recall that the main file
\begin{verbatim}
 \documentclass{...}
 \includeonly{ch2}
 \begin{document}
   \include{ch1}
   \include{ch2}
   \include{ch3}
 \end{document}
\end{verbatim}
will process only the file \texttt{ch2.tex} as though the files
\texttt{ch1.tex} and \texttt{ch3.tex} were also present. That is, all
counters, especially the page and section numbers, as well as
cross-referencing definitions, will function as if the whole document
were processed. The trick is that each |\include|d file has it own
\texttt{.aux} file containing these definitions, and they are all read
in every time, even if the corresponding \texttt{.tex} file is not. The
\texttt{.aux} files also contain the citation information for \btx,
something that the \texttt{chapterbib} package exploits.

If |\usepackage{chapterbib}| has been given, the keys in each |\cite|
and |\bibitem| command are associated with the current |\include|d file
and are distinguished from the identical key in a different file. Each of
these files must contain its own |\bibliography| and |\bibliographystyle|
commands. One processes \btx\ on each file separately before processing
it under \LaTeX\ (at least twice).

\subsubsection{Special Considerations for \thestyle\ and
         \texttt{chapterbib}}

The order in which the \texttt{chapterbib} and \thestyle\ packages are loaded
is unimportant.

The \texttt{chapterbib} package provides an option \texttt{sectionbib}
that puts the bibliography in a |\section*| instead of |\chapter*|,
something that makes sense if there is a bibliography in each chapter.
This option will not work when \thestyle\ is also loaded; instead, add
the option to \thestyle.
(The \texttt{sectionbib} option can always be
given, but it only has meaning for the \texttt{book} and \texttt{report}
classes, or for classes derived from them.)

Every |\include|d file must contain its own
|\bibliography| command where the bibliography is to appear. The database
files listed as arguments to this command can be different in each file,
of course. However, what is not so obvious, is that each file must also
contain a |\bibliographystyle| command, with possibly differing arguments.

As of version~8.0, the citation style, including mode (author--year or
numerical) may also differ between chapters. The |\setcitestyle| command
as well as |\bibpunct| and |\citestyle|
can be issued at any point in the document, in particular in different
chapters.
(And this is the only time it would make sense to do so.)



\subsection{Sorting and Compressing Numerical Citations}
\label{sec:sort}

Another package by Donald Arseneau, \texttt{cite.sty}, reimplements the
entire (numerical) citation system such that one can control the
punctuation and citation format, all of which is done by \thestyle\ as
well. However, it also can sort and compress numerical citations,
something that is required by some journals.

What this means is that when multiple citations are given with a single
|\cite| command, the normal order of the numbers is in the sequence
given. This is usually a wild list of numbers, such as [4,2,8,3]. With
the \texttt{cite} package, this list becomes [2--4,8].

It is impossible to make the \texttt{cite} and \thestyle\ packages
compatible, since both reimplement |\cite| from scratch. Instead, I have
taken over some of the coding from \texttt{cite.sty}, modifying it for
\thestyle{}. This coding is activated by including one of the options
\texttt{sort} or \texttt{sort\&compress} in the |\usepackage| command.

For author--year citations, the option \texttt{sort} orders the citations in
a single |\citep| or |\citet| command into the sequence in which they appear
in the list of references. This is normally alphabetical first, year second.
This should avoid citations of the type: ``James et~al.\ (1994b,a)''. For
author--year mode, the \texttt{sort\&compress} option is identical to
\texttt{sort}.



\subsection{Merged Numerical References}
\label{sec:merge}


\begin{quote}
\textbf{Note:} the |merge| coding was contributed by
Arthur Ogawa for the American Physical Society.
\end{quote}

Thorsten Ohl's \texttt{mcite} package cannot be used together with
\thestyle. Instead, one must invoke the package option
\texttt{merge} with the |\usepackage| statement.


With this option in effect, citation keys within a multiple |\citep| command
may contain a leading * that causes them to be merged in the bibliography
together with the previous citation as a single entry with a single reference
number. For example, |\citep{feynmann,*salam,*epr}| produces a single number,
and all three references are listed in the bibliography under one entry with
that number.

Certain restrictions of Thorsten Ohl's \texttt{mcite} package are lifted: a *
prefix can be used with any citation key, and Ohl's restrictions on syntax do
not apply.

An additional feature allows text to be inserted inside the bibliography entry:
within the argument of \verb+\citep+, a cite key may be preceded by two optional arguements, e.g.,
\verb+\citep{[+\emph{pre}\verb+][+\emph{post}\verb+]+\emph{key}\verb+}+,
where \emph{pre} represents text to be prepended to the reference (\verb+\bibitem+ content),
with \emph{post} appended thereto.

Thus it is possible for the user to mark up the document:
\begin{verbatim}
text \citep{*[{See, e.g., }][ for a simpler explanation]ablebaker}
\end{verbatim}
The above example illustrates the use of the star-form and both optional arguments.

\medskip\noindent
\textbf{Caution:} Because the comma (,) character is part of the syntax of \verb+\citep+,
and because the bracket delimiters ([]) are mere text characters and not true delimiters (like the braces),
you must enclose the optional argument in braces (\verb+{}+) if a comma is present in the
argument (that goes for brackets, too, of course).

The \texttt{elide} option also activates the merging features, but also sees
to it that common parts of the merged references (e.g., authors) are not
repeated but are written only once in the single bibliography entry.

The \texttt{mcite} option turns off the merging and eliding features, but
allows the special syntax (the * and optional inserted texts) to be ignored.

These functions are available only to numerical-mode citations, and only when
used parenthetically, similar to the restrictions on \texttt{sort} and
\texttt{compress}.

They also require special \texttt{.bst} files, as provided for example by the
American Physical Society for their REV\TeX\ class.


\subsection{Long Author List on First Citation}\label{sec:long}

A feature that has often been requested by otherwise happy users of
\thestyle\ is one that is found in the \texttt{harvard} package as
standard: with the first citation of any reference, the full author list is
printed, and afterwards only the abbreviated list. One can control this
with |\citet*| for the first citation, and |\citet| or |\citep| thereafter.
However, the automatic feature is very desired.

This can be activated with the option
\texttt{longnamesfirst}.



\DescribeMacro{\shortcites}
Some references have so many authors that you want to suppress the
automatic long list only for them. In this case, issue
\begin{quote}
 |\shortcites|\marg{key-list}
\end{quote}
before the first citations, and those included in \emph{key-list} will have
a short list on their first citation.

Full author lists can still be forced at any time with the starred
variants.

\section{Numerical Citations with Author--Year Styles}\label{sec:6.0}

It is possible to produce numerical citations with any author-year
\texttt{.bst} file, with minimal change to the text. The commands |\citet|
and |\citep| will produce sensible results in both modes, without any special
editing. Obviously, the opposite is not possible; a \texttt{.bst} file
intended for numerical citation can never produce author--year citations,
simply because the information is not transferred to the auxiliary file.

\subsection{Selecting Numerical Mode}
By default, \thestyle{} is in author--year mode. This can be changed by
\begin{enumerate}
 \item selecting a numerical bibliography style with predefined
       citation style, defined either in the package or in the local
       configuration file;

 \item giving options \texttt{numbers} or \texttt{super} to the
       |\usepackage| command;

 \item issuing |\setcitestyle{numbers}|;

 \item issuing |\citestyle| with the name of a predefined numerical
       bibliography style (like \texttt{plain} and use it with \texttt{plainnat}).
\end{enumerate}

The \thestyle{} package will automatically switch to numerical mode if
any one of the |\bibitem| entries fails to conform to the possible
author--year formats. There is no way to override this, since such an
entry would cause trouble in the author--year mode.

There are certain special `numerical' styles, like that of the standard
\texttt{alpha.bst}, which include a non-numerical label in place of the
number, in the form
\begin{quote} |\bibitem[ABC95]{able95}| \end{quote}
As far as \thestyle\ is concerned, this label does not conform to the
author--year possibilities and is therefore considered to be numerical.
The citation mode switches to numerical, and |\cite{able95}| prints
[ABC95].

See however, the end of Section~\ref{sec:yearless} for another possibility.
The above result can be achieved with
\begin{quote} |\bibitem[ABC95()]{able95}| \end{quote}

\section{Local Configuration}
It is possible to add a local configuration file
\thestyle\texttt{.cfg}, which is read in, if it exists, at
the end of the package. It may thus contain coding to supecede that in
the package, although its main purpose is to allow the user to add his or her
own |\bibstyle@|\textit{bst} definitions to couple citation punctuation
with local bibliography styles or for use with |\citestyle|.



\section{Package Options}\label{sec:opts}
When a package is loaded with |\usepackage|, one can add options to select
different features, as
\begin{quote}
|\usepackage[|\emph{options}|]{|\thestyle|}|
\end{quote}

The options available provide another means of specifying the
punctuation for citations:
\begin{description}
\item[\ttfamily round] (default) for round parentheses;
\item[\ttfamily square] for square brackets;
\item[\ttfamily curly] for curly braces;
\item[\ttfamily angle] for angle brackets;
\item[\ttfamily semicolon] (default) to separate multiple citations with
   semi-colons;
\item[\ttfamily colon] the same as \texttt{semicolon}, an earlier mistake in
   terminology;
\item[\ttfamily comma] to use commas as separators;
\item[\ttfamily authoryear] (default) for author--year citations;
\item[\ttfamily numbers] for numerical citations;
\item[\ttfamily super] for superscripted numerical citations, as in
   \textsl{Nature};
\item[\ttfamily sort] orders multiple citations into the sequence in
   which they appear in the list of references;
\item[\ttfamily sort\&compress] as \texttt{sort} but in addition multiple
   numerical citations are compressed if possible (as 3--6, 15);
\item[\ttfamily compress] to compress without sorting, so compression only
   occurs when the given citations would produce an ascending sequence of
   numbers;
\item[\ttfamily longnamesfirst] makes the first citation of any reference
   the equivalent of the starred variant (full author list) and subsequent
   citations normal (abbreviated list);
\item[\ttfamily sectionbib] redefines |\thebibliography| to issue
   |\section*| instead of |\chapter*|; valid only for classes with a
   |\chapter| command; to be used with the \texttt{chapterbib} package;
\item[\ttfamily nonamebreak] keeps all the authors' names in a citation on
   one line; causes overfull hboxes but helps with some \texttt{hyperref}
   problems;
\item[\ttfamily merge] to allow the * prefix to the citation key,
   and to merge such a citation's reference with that of the previous
   citation;
\item[\ttfamily elide] to elide common elements of merged references, like
   the authors or year;
\item[\ttfamily mcite] to recognize (and ignore) the merging syntax.
\end{description}
The options \texttt{curly} and \texttt{angle} are not really serious; I only
added them because that completes the normal list of bracket types. The only
other citation possibilities I know have really encountered are solidus, e.g. /21/,
or something like (Ref. 21). These must be set with |\setcitestyle{open={/},close={/}}|.


The package options are overwritten by any explicit |\setcitestyle|, |\bibpunct|,
or |\citestyle| commands. And both these commands and the package options
turn off the automatic setting with |\bibliographystyle|, if effective.

\section{Reference Sheet}

A summary of the main points on using \thestyle\ can be obtained by
\LaTeX{}ing the file \texttt{natnotes.tex}, which is extracted from the main
source file \thestyle\texttt{.tex} with the \texttt{docstrip} option
\texttt{notes}. This is intended to act as a handy reference sheet.

This file should be extracted automatically by the supplied installation file,
\thestyle\texttt{.ins}.

^^A The following is a summary that goes into the .sty file
^^A It is not printed in the documentation, since the Reference Sheet exists

\section{Options with \texttt{docstrip}}
The source \texttt{.tex} file is meant to be processed with
\texttt{docstrip}, for which a number of options are available:
\begin{description}
\item[\ttfamily all] includes all of the other interfaces;

\item[\ttfamily apalike] allows interpretation of minimal \texttt{apalike}
  form of |\bibitem|;

\item[\ttfamily newapa] allows |\citeauthoryear| to be in the optional
  argument of |\bibitem| along with the punctuation commands of
  \texttt{newapa.sty};

\item[\ttfamily chicago] is the same as \texttt{newapa};

\item[\ttfamily harvard] includes interpretation of |\harvarditem|;

\item[\ttfamily astron] allows |\astroncite| to appear in the optional
  argument of |\bibitem|;

\item[\ttfamily authordate] adds the syntax of the |\citename| command.

\end{description}

The remaining options are:
\begin{description}
\item[\ttfamily package] to produce a \texttt{.sty} package file with most
   comments removed;

\item[\ttfamily notes] extracts a summary of usage to be used as a
   reference sheet; the resulting file is to be \LaTeX{}ed;

\item[\ttfamily driver] to produce a driver \texttt{.ltx} file that will
   print out the documentation when \LaTeX'd. This file can be modified
   to produce various alternatives (page size, fonts, manual only, or with
   annotated code). The \thestyle\texttt{.tex} file is itself such a driver
   but it should never, ever be edited by a user.

\end{description}
The source file \texttt{\filename.tex} is itself a driver file and can
be processed directly by \LaTeX.


\section{Other Author--Year Solutions}
\begin{quote}\slshape
This section is of historical interest only.
\end{quote}

Before \thestyle{} was published in 1993, there were several other attempts
to provide author--year citations, some of which inspired \thestyle. A few of
these are still maintained and used, and for that reason, \thestyle{} has
attempted to include their |\bibitem| syntaxes, to be compatible with those
\texttt{.bst} files.

Most of these `packages' are really \LaTeX~2.09 style files, so do not have
features available with the modern \LaTeXe.

\subsection{The \texttt{natsci.bst} Style}
What gave me my first inspiration was Stephen Gildea's \texttt{natsci.bst}
for use with his \texttt{agujgr.sty} file. This showed me that the problem
was solvable. However, Gildea's formats |\bibitem| with just
the abbreviated
authors and year. Thus only parenthetical citations can be accommodated.

The name \texttt{natsci} stands for \emph{natural sciences}, and it was this
that led to the name \thestyle. (This is admittedly an ugly name, but it is
now established and cannot be changed so easily.)

\subsection{The \texttt{apalike.bst} Style}
Oren Patashnik, the originator of \btx{} and the standard \texttt{.bst}
files, has also worked on an author--year style, called \texttt{apalike.bst}
with a corresponding \texttt{apalike.sty} to support it. Again, only the
parenthetical citation is provided. Its functionality is identical to that
of the \texttt{natsci} files.

The form of the \texttt{thebibliography} entries in this system is
\begin{quote}
|\bibitem[Jones et al., 1990]{jon90}...|
\end{quote}
This is the most minimal form that can
be given. I name it the \texttt{apalike} variant, after Patashnik's
\texttt{apalike.bst} and \texttt{apalike.sty}. However, there could be many
independent \texttt{.bst} files that follow this line, such as the
\texttt{natsci} styles.

The bibliography style files belonging to this group include:
\begin{quote}
\texttt{apalike}, \texttt{apalike2}, \texttt{cea}, \texttt{cell},
\texttt{jmb}, \texttt{phapalik}, \texttt{phppcf}, \texttt{phrmp}
\end{quote}

\subsection{The \texttt{newapa} Style}
A major improvement was achieved with \texttt{newapa.bst} and the
accompanying \texttt{newapa.sty} files by Stephen N. Spencer and Young U.
Ryu. Under their system, three separate items of information are included
in the |\bibitem| label, to be used as required. These are: the full
author list, the abbreviated list, and the year. This is accomplished by
means of a |\citeauthoryear| command included in the label, as
\begin{quote}
|\bibitem[\protect\citeauthoryear{Jones, Barker,|\\
|  and Williams}{Jones et al.}{1990}]{jon90}...|
\end{quote}
Actually, this only illustrates the basic structure of |\citeauthoryear|;
the \texttt{newapa} files go even further to replace some words and
punctuation
with commands. For example, the word `and' above is really
|\betweenauthors|, something that must be defined in the \texttt{.sty} file.
Of course, |\citeauthoryear| is also defined in that file. A
number of different |\cite| commands are available to print out the
citation with complete author list, with the short list, with or without
the date, the textual or parenthetical form.

Thus the |\citeauthoryear| entry in |\bibitem| is very flexible,
permitting the style file to generate every citation form that one might
want. It is used by a number of other styles, with corresponding
\texttt{.sty} files. They all appear to have been inspired by
\texttt{newapa.bst}, although they lack the extra punctuation commands.

Bibliographic style files belonging to the \texttt{newapa} group include
\begin{quote}
\texttt{newapa}, \texttt{chicago}, \texttt{chicagoa}, \texttt{jas99},
\texttt{named}
\end{quote}

\noindent
\textbf{Note:} the last of these, \texttt{named.bst}, uses |\citeauthoryear| in a
slightly different manner, with only two arguments: the short list and
year.

\subsection{The Harvard Family}
The same effect is achieved by a different approach in the Harvard family
of bibliographic styles. Here a substitute for |\bibitem| is used, as
\begin{quote}
|\harvarditem[Jones et al.]{Jones, Baker, and|\\
|   Williams}{1990}{jon90}...|
\end{quote}
The accompanying interface package file is called \texttt{harvard.sty}
and is written by Peter Williams and Thorsten Schnier. It
defines |\harvarditem| as well as the citation commands |\cite|, for
parenthentical, and |\citeasnoun|, for textual citations. The first
citation uses the long author list, following ones the shorter list, if
it has been given in the optional argument to |\harvarditem|.

Bibliography styles belonging to the Harvard family are
\begin{quote}
\texttt{agsm}, \texttt{dcu}, \texttt{kluwer}
\end{quote}

This package has been updated for \LaTeXe, with many additions to
add flexibility. The result is a powerful interface that should meet most
citation needs. (It does not suppress repeated authors, though,
as \thestyle{} does.)

\subsection{The Astronomy Style}
Apparently realizing the limitations of his \texttt{apalike} system, Oren
Patashnik went on to develop a `true' \texttt{apa} bibliographic style,
making use of the method already employed by an astronomy journal. This
is actually very similar to the \texttt{newapa} label but with only the
short list of authors:
\begin{quote}
|\bibitem[\protect\astroncite{Jones et al.}{1990}]{jon90}|\\
|   ...|
\end{quote}
It requires the package file \texttt{astron.sty}
or any other style that defines |\astroncite| appropriately.

Bibliographic styles belonging to the astronomy group are
\begin{quote}
\texttt{apa}, \texttt{astron}, \texttt{bbs}, \texttt{cbe},
\texttt{humanbio}, \texttt{humannat}, \texttt{jtb}
\end{quote}

This is as good as the |\citeauthoryear| command, although not as
flexible since the full list of authors is missing.

\subsection{The \texttt{authordate} Style}
Finally, I also found some packages making use of a label command
called |\citename| in the form
\begin{quote}
|\bibitem[\protect\citename{Jones et al., }1990]{jon90}|\\
|    ...|
\end{quote}

This is not a good system since the author list and date are not cleanly
separated as individual arguments, and since the punctuation is included
in the label text. It is better to keep the punctuation fully removed, as
part of the definitions in the \texttt{.sty} file, for complete flexibility.

Bibliographic styles belonging to this group are
\begin{quote}
\texttt{authordate1}, \texttt{authordate2}, \texttt{authordate3},
\texttt{authordate4}, \texttt{aaai-named}
\end{quote}
with accompanying style file \texttt{authordate1-4.sty}.
